package org.wmq.skyserver.mapper;

import org.apache.ibatis.annotations.*;
import org.wmq.skycommon.pojo.DTO.ShoppingCartDTO;
import org.wmq.skycommon.pojo.entity.ShoppingCart;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    public abstract List<ShoppingCart> list(ShoppingCart shoppingCart);

    @Update("update shopping_cart set number = #{number} where id = #{id}")
    public abstract void updateNumberById(ShoppingCart result);

    @Insert("insert into shopping_cart(name) values (#{name})")
    public abstract void insert(ShoppingCart shoppingCart);

    @Delete("delete from shopping_cart where user_id = #{userId}")
    public abstract void delete(Long userId);
}
